text 10 10 180 10 center "PCBMAIL setup is scanning for boards now."
enddialog
for ndx = 1 upto $DIALCOUNT
set dialdir access ndx
if strcmpi $D_SCRIPT "pcbmail"
strcat pcblist ","
strcat pcblist $D_NAME
endif
endfor
; SETMAIL uses a section on the INI for board "(None)" to show sample
; settings in the dialog box. However, if this is the first time that
; SETMAIL has been run, or if the INI has been deleted, there will be no
; section, labelled [(None)]. If not, this creates it.
profilerd ini name "board_id" board
if null_str(board)
set_none()
else
read_ini()
endif
pause 1
destroydlg
if strcmpi pcblist "(None)"
errormsg "There are no PCBMAIL systems in the dialing directory!"
exit
endif
pwfile=$PWTASKPATH
addfilename pwfile "PW.EXE"
iconvar="UserID"
iconvar2="Password"
dialogbox 80 45 245 186 13
groupbox 10 4 224 39 shadow
text 18 12 209 28 center "Use this dialog box to set the parameters which the PCBMAIL script needs to operate. The Join Conference? parameter is optional."
text 10 51 81 8 right "Select a PCBoard system :"
combobox 100 49 135 55 pcblist name sort
text 10 71 60 8 left "QWK filename?"
editbox 75 69 45 12 board 8
text 125 70 69 8 left "Mail door # (name)?"
editbox 195 68 40 13 door
text 10 91 60 8 left "Mail directory?"
editbox 75 89 50 12 maildir
text 130 91 60 8 left "Join Conference?"
editbox 195 89 40 12 defconf
groupbox 10 110 225 30 "Rename mail options"
radiobutton 20 122 100 10 "Standard format - QWA" rb1
radiobutton 130 122 100 10 "Alternate format - with date" endgroup
iconbutton 10 147 iconvar pwfile icondx
iconbutton 40 147 iconvar2 pwfile icondx2
pushbutton 76 153 40 14 "&Save" normal
pushbutton 134 153 41 14 "&Delete" normal
pushbutton 195 153 40 14 "E&xit" cancel
enddialog
disable ctrl 230 233
disable ctrl 210 211
disable ctrl 50
disable ctrl 10 11
dlgstatus = $DIALOG
while dlgstatus != 1
switch dlgstatus
; case 170 handles the selection of a name from the drop down box
case 170
if strcmpi name "(None)"
disable ctrl 230 233
disable ctrl 210 211
disable ctrl 50
disable ctrl 10 11
read_ini()
updatedlg 130
else
enable ctrl 230 233
enable ctrl 210 211
enable ctrl 50
enable ctrl 10 11
read_ini()
dialfind name ndx
set dialdir access ndx
fetch password pword
fetch userid user
updatedlg 130
if not null_str(maildir)
source = 1
chk_dir()
endif
endif
endcase
; cases 210 and 211 handle a press of either icon in the dialog box
case 210
user2=user
redo:
sdlginput "UserID" "Enter / Edit the UserID : " user DEFAULT